<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/9/22
  Time: 15:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<link rel="stylesheet" href="webjars/bootstrap/3.4.1/dist/css/bootstrap.min.css">
<script src="webjars/jquery/3.6.1/dist/jquery.min.js"></script>
<script src="webjars/bootstrap/3.4.1/dist/js/bootstrap.min.js"></script>
<html>
<head>
    <title>购物车列表</title>
    <style>
        .container{
            margin-top: 10px;
        }
        .table{
            text-align: center;
        }
    </style>
</head>
<body>
   <div class="container">
       <div class="panel panel-primary">
           <div class="panel-heading">
               <h3 class="panel-title">
                   <h3>购物车列表</h3>
               </h3>
           </div>
           <table class="table table-hover table-striped">
               <tr>
                   <td>商品ID</td>
                   <td>商品名称</td>
                   <td>单价</td>
                   <td>购买数量</td>
                   <td>操作</td>
               </tr>
               <c:forEach items="${cart.map}" var="p">
               <tr>
                   <td>${p.value.product.pid}</td>
                   <td>${p.value.product.pname}</td>
                   <td>${p.value.product.price}</td>
                   <td>${p.value.num}</td>
                   <td>
                       <a href="#" class="btn btn-danger btn-sm">移除</a>
                   </td>
               </tr>
               </c:forEach>
           </table>
           <div class="panel-footer text-right">
               百年智2022.
           </div>
       </div>
   </div>
</body>
</html>
